{#
(C) Copyright 2011 Jose Carrasco <jose.carrasco[a]vikuit.com>

This file is part of "vikuit".

"vikuit" is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

"vikuit" is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with "vikuit".  If not, see <http://www.gnu.org/licenses/>.
#}

	
		{% if sess.user %}
			 	
			{% if user.rol == 'admin' %}
			
			{% set admin_menu_bar = [
			    ('/module/admin.application', 'admin.application', _('Configure application')),
			    ('/module/admin.lookandfeel', 'admin.lookandfeel', _('Configure look and feel')),
			    ('/module/admin.mail', 'admin.mail', _('Configure mail stuff')),
			    ('/module/admin.modules', 'admin.modules', _('Configure modules')),
			    ('/module/admin.google', 'admin.google', _('Configure google stuff')),
			    ('/module/admin.community.add.related', 'admin.community.add.related', _('Bind community')),
			    ('/module/admin.categories', 'admin.categories', _('Administrate categories')),
			    ('/module/admin.stats', 'admin.stats', _('Web stats')),
			    ('/module/admin.cache', 'admin.flush.cache', _('Manage cache'))
			] %}
  
				<li class="dropdown">
  					<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">{{ _('Administration') }}<span class="caret"></span></a>
					<ul class="dropdown-menu">
 						{% for href, id, caption in admin_menu_bar %}
						  {% if  href == tab %}
						 	<li><strong><a href="{{ href|e }}">{{ caption }}</a></strong></li>
						  {% else %}
							<li><a href="{{ href|e }}">{{ caption }}</a></li>
						  {% endif %}
						{% endfor %}
						<li class="nav-header">Nav header</li>
                  <li><a href="#">Separated link</a></li>
                  <li><a href="#">One more separated link</a></li>
					</ul>
				</li>
				
		 
				 
			{% endif %}
			 
					<li class="dropdown">
  					<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">{{ _('Footprints') }}- {{ _('Account')}}<span class="caret"></span></a>
					<ul class="dropdown-menu">
				
			 
					<li><a href="/module/user.events"  class="button more_ntop_element"><img src="/static/images/heart.png" alt="" class="icon" /> {{ _('Your lifestreaming') }}</a></li>
					<li><a href="/module/user/{{ user.nickname }}"  class="button more_ntop_element"><img src="/static/images/user.png" alt="" class="icon" /> {{ _('Your public profile') }}</a></li>
					<li><a href="/module/user.articles/{{ user.nickname }}"  class="button more_ntop_element"><img src="/static/images/page_white_text.png" alt="" class="icon" /> {{ _('Your articles') }}</a></li>
					<li><a href="/module/user.forums/{{ user.nickname }}"  class="button more_ntop_element"><img src="/static/images/comments.png" alt="" class="icon" /> {{ _('Your threads') }}</a></li>
					<li><a href="/module/user.favourites/{{ user.nickname }}"  class="button more_ntop_element"><img src="/static/images/star.png" alt="" class="icon" /> {{ _('Your favorites') }}</a></li>
					<li><a href="/module/user.communities/{{ user.nickname }}"  class="button more_ntop_element"><img src="/static/images/community.png" alt="" class="icon" /> {{ _('Your communities') }}</a></li>
					<li><a href="/module/user.contacts/{{ user.nickname }}"  class="button more_ntop_element"><img src="/static/images/user.png" alt="" class="icon" /> {{ _('Your contacts') }}</a></li>
					<li><a href="/invite"  class="button more_ntop_element"><img src="/static/images/user_comment.png" alt="" class="icon" /> {{ _('Invite your friends') }} </a></li>
					
				<li><hr></li>	
				
				<li><a href="/message.inbox"  class="button more_ntop_element"><img src="/static/images/email.png" alt="" class="icon" /> {{ _('Inbox') }} {% if user.unread_messages %}({{ user.unread_messages}}){% endif %}</a></li>
				<li><a href="/message.sent"  class="button more_ntop_element"><img src="/static/images/email_edit.png" alt="" class="icon" /> {{ _('Sent messages') }}</a></li>
				
					
					<li class="li_last_round">&nbsp;</li>
			 
					<li><a href="/module/user.changepassword?redirect_to={{ redirect }}" class="button more_ntop_element"><img src="/static/images/key.png" alt="" class="icon" />{{ _('Change password') }}</a></li>
					<li><a href="/module/user.edit" class="button more_ntop_element"><img src="/static/images/cog.png" alt="" class="icon" />{{ _('Preferences') }}</a></li>
					
					<li><hr></li>	
					<li><a href="{{ logout }}" class="button more_ntop_element"><img src="/static/images/logout.png" alt="" class="icon" />{{ _('Logout') }}</a></li>
				
			
				
				<li class="li_last_round">&nbsp;</li>
				</ul>
				<!--[if lte IE 6]></td></tr></table></a><![endif]--></div>
				 
 	 
		{% else %}	

		 
				<a href="/module/user.login?redirect_to={{ redirect }}" class="top_link"><span class="down" style="font-weight: bold;">{{ _('Log in') }}</span>
			 	
		 
				<a href="/module/user.register?redirect_to={{ redirect }}" class="top_link"><span class="down" style="font-weight: bold;">{{ _('Register') }}</span>
		  
				<a href="/module/user.forgotpassword?redirect_to={{ redirect }}" class="top_link"><span class="down" style="font-weight: bold;">{{ _('Forgot password?') }}</span>
			 
 	 
		{% endif %}
	 
 

{% block javascript %}
	
{% endblock %}